package cn.intotw.rdcj.goods.api;

import cn.intotw.rdcj.core.bean.Result;
import cn.intotw.rdcj.goods.dto.GoodsReduceReqVo;
import cn.intotw.rdcj.goods.dto.GoodsReduceResVo;
import cn.intotw.rdcj.goods.fallback.RdcjGoodsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * Created by Chenxiang on 2020/4/30.
 */
@FeignClient(
        value ="rdcj-goods",
        fallbackFactory = RdcjGoodsFallbackFactory.class
)
public interface RdcjGoodsApi {
    /**
        扣减库存
     * @author Chenxiang
     * @date 2020/12/18 14:15
     * @param goodsReduceReqVo reqVo
     * @return cn.intotw.rdcj.core.bean.Result
     **/
    @PostMapping(
            value ="/rdcj/goods/v1/reduce",
            consumes={"application/json"}
    )
    Result<GoodsReduceResVo> goodsReduce(GoodsReduceReqVo goodsReduceReqVo);
}
